# linker
LINK = g++

# Turn on optimization and warnings:
CFLAGS = -Wall -O -g -std=c++11

CXXFLAGS = $(CFLAGS)

# OpenGL libraries for Linux
GL_LIBS = -lglut -lGLU -lGL -lm

# SDL Libraries
# apt-get install libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev
SDL_LIBS = -lSDL -lSDL_image -lSDL_ttf

#-----------------------------------------------------------------------

# Targets:

# MAKE allows the use of "wildcards", to make writing compilation instructions
# a bit easier. GNU make uses $@ for the target and $^ for the dependencies.

#===========================================

# By default, build (almost) everything:

EXE = TheTravelers
all:	$(EXE)

#===========================================

TheTravelers:	Sprite.o Globals.o Tile.o Dot.o Timer.o Level.o TheTravelers.o
	$(LINK) -o $@ $^ $(CFLAGS) $(SDL_LIBS)

#===========================================

clean:
	rm -f *.o *~ core

cleanall:
	rm -f *.o *~ core $(EXE)

